package com.wfcm.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;  
/* 
 * 配置多数据源 
 */  

public class DynamicDataSource extends AbstractRoutingDataSource{  
  
    @Override  
    protected Object determineCurrentLookupKey() {  
    	
    	//System.out.println("此时获取到的数据源为："+DataSourceContextHolder.getCustomerType());   
        return DataSourceContextHolder.getCustomerType();  
          
    }  
}
